package com.zyl.familyspacemybatisplus.aop;

import com.github.pagehelper.PageHelper;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;

/**
 * @Desc 预防代码不规范导致的分页漏洞
 * @author
 * @date 2020/11/23 上午11:05
 * @version
 */
@Slf4j
@Aspect
public class PageClearAspect {

    /***/
    @Around("execution(* service..*.*(..))")
    public Object around(ProceedingJoinPoint pjp) throws Throwable {
        PageHelper.clearPage();
        return pjp.proceed();
    }

}
